<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
            <div class="layui-form-item">
                <form class="layui-form" method="get" action="">
                    <div class="layui-inline">
                        <label class="layui-form-label">开始时间</label>
                        <div class="layui-input-block">
                            <input type="text" name="start_time" value="{$start_time|default=''}" id="start_time" readonly class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">结束时间</label>
                        <div class="layui-input-block">
                            <input type="text" name="end_time" value="{$end_time|default=''}" id="end_time" readonly class="layui-input" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <button class="layui-btn layuiadmin-btn-useradmin">
                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                        </button>
                    </div>
                </form>
            </div>
        </div>
        <div class="layui-card-body">
            <div class="left mb10">
                {:u('/Messages/insertMessages','','添加消息','load','layui-btn-normal')}
            </div>
            <div class="layui-form">
                <table class="layui-table" id="table-list">
                    <thead>
                    <tr>
                        <td class="w50">
                            <input type="checkbox" name="messages_id[]" lay-skin="primary" lay-filter="allChoose">
                        </td>
                        <td class="w50">ID</td>
                        <td>信息标题</td>
                        <td>接收人</td>
                        <td>创建时间</td>
                        <td>是否推送</td>
                        <td>是否发送</td>
                        <td>操作</td>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="list" item="val" key="key"}
                    <tr>
                        <td>
                            <input type="checkbox" name="messages_id[]" lay-skin="primary" data-id="{$val.messages_id}">
                            <div class="layui-unselect layui-form-checkbox" lay-skin="primary"><i class="layui-icon"></i></div>
                        </td>
                        <td>{$val.messages_id}</td>
                        <td>{$val.title}</td>
                        <td>{$val.target_name}</td>
                        <td>{$val.create_time}</td>
                        <td>
                            {eq name="val.is_push" value="0"}<span style="color: #666666;">否</span>{/eq}
                            {eq name="val.is_push" value="1"}<span style="color: #666666;">是</span>{/eq}
                        </td>
                        <td>
                            {eq name="val.is_send" value="0"}<span style="color: #be2924;">未发送</span>{/eq}
                            {eq name="val.is_send" value="1"}<span style="color: #2c967f;">已发送</span>{/eq}
                        </td>
                        <td>
                            {eq name="val.is_send" value="0"}
                            {:u('/Messages/sendMessages',['messages_id'=>$val['messages_id']],'发送','act','layui-btn-normal layui-btn-sm')}
                            {/eq}
                            {:u('/Messages/updateMessages',['messages_id'=>$val['messages_id']],'编辑','load','layui-btn-normal layui-btn-sm')}
                            {:u('/Messages/deleteMessages',['messages_id'=>$val['messages_id']],'删除','act','layui-btn-danger layui-btn-sm')}
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <div class="paging">{$page|raw}</div>
            </div>
        </div>
    </div>
</div>